package com.bolt.auth.security.common.constant;

/**
 * Created by Administrator on 2019/9/24.
 */
public class SecurityConstants {
    /**
     * 角色前缀
     */
    public static String ROLE = "ROLE_";


    /**
     * oauth 相关前缀
     */
    public static String OAUTH_PREFIX = "oauth:";


    /**
     * 内部
     */
    public static String FROM_IN = "Y";

    /**
     * 标志
     */
    public static String FROM = "from";

    /**
     * 登录页面
     */
    public static String LOGIN_PAGE = "/login";

    /**
     * 登出URL
     */
    public static String LOGOUT_URL = "/auth/remove/token";
    /**
     * 手机号登录URL
     */
    public static String MOBILE_TOKEN_URL = "/mobile/token";

    /**
     * oauth token
     */
    public static String OAUTH_TOKEN_URL = "/oauth/token";

    /**
     * OAUTH模式登录处理地址
     */
    public static String OAUTH_LOGIN_PRO_URL = "/user/login";
    /**
     * grant_type
     */
    public static String REFRESH_TOKEN = "refresh_token";

    /**
     * 用户ID字段
     */
    public static String DETAILS_USER_ID = "user_id";

    /**
     * 用户名字段
     */
    public static String DETAILS_USERNAME = "username";

    /**
     * 用户部门字段
     */
    public static String DETAILS_DEPT_ID = "dept_id";

    public static String DETAILS_CLIENT_ID = "client_Id";
    /***
     * 资源服务器默认bean名称
     */
    public static String RESOURCE_SERVER_CONFIGURER = "resourceServerConfigurerAdapter";


    /**
     * 验证码key
     */
    public final static String VERIFICATION_CODE = "verificationCode";
    /**
     * 验证码Id
     */
    public final static String GRAPH_ID = "graphId";

    /**
     * 默认token过期时间(1小时)
     */
    public final static Integer ACCESS_TOKEN_VALIDITY_SECONDS = 60 * 60;

    /**
     * 缓存client的redis key，这里是hash结构存储
     */
    public final static String CACHE_CLIENT_KEY = "oauth_client_details";

    /**
     * rsa公钥
     */
    public final static String RSA_PUBLIC_KEY = "pubkey.txt";
}

 